import { Layout } from '@fl/utils/routerHelper'

const productManagement: AppRouteRecordRaw = {
    children: [
        {
            component: () => import('@/supplier-pages/product-management/list/index.vue'),
            meta: {
                title: '产品列表',
            },
            name: 'list',
            path: 'list',
        },
        {
            component: () => import('@/supplier-pages/product-management/list/add.vue'),
            meta: {
                activeMenu: '/supplier-pages/product-management/list',
                hidden: true,
                noTagsView: true,
                title: '新增产品',
            },
            name: 'add',
            path: 'add',
        },
        {
            component: () => import('@/supplier-pages/product-management/list/detail.vue'),
            meta: {
                activeMenu: '/supplier-pages/product-management/list',
                hidden: true,
                title: '详情修订',
            },
            name: 'detail',
            path: 'detail',
        },
        {
            component: () => import('@/supplier-pages/product-management/list/edit-properties.vue'),
            meta: {
                activeMenu: '/supplier-pages/product-management/list',
                hidden: true,
                title: '规格属性',
            },
            name: 'product-management-edit-properties',
            path: ':id/edit-properties',
        },
        {
            component: () => import('@/supplier-pages/product-management/list/log.vue'),
            meta: {
                activeMenu: '/supplier-pages/product-management/list',
                hidden: true,
                noTagsView: true,
                title: '产品日志',
            },
            name: 'product-management-log',
            path: ':id/log',
        },
        {
            component: () => import('@/supplier-pages/product-management/brand/index.vue'),
            meta: {
                title: '产品品牌',
            },
            name: 'product-management-brand',
            path: 'brand',
        },
        {
            component: () => import('@/supplier-pages/product-management/report/index.vue'),
            meta: {
                title: '产品报告',
            },
            name: 'product-management-report',
            path: 'report',
        },
        {
            component: () => import('@/supplier-pages/product-management/certificate/index.vue'),
            meta: {
                title: '产品证书',
            },
            name: 'product-management-certificate',
            path: 'certificate',
        },
    ],
    component: Layout,
    meta: {
        alwaysShow: true,
        title: '产品管理',
    },
    name: 'product-management',
    path: 'product-management',
    redirect: '/supplier-pages/product-management/list',
}

export default productManagement
